#include <stdio.h>
#include "apdu.h"

static int exchangeDefault(const ApduAsk *ask, ApduAck *ack, Error *err)
{
    //todo:
    printf("Please init apdu_interface useage ApduModuleInit()\n");
    return 0;
}

void ApduModuleInit(int (*exchange)(const ApduAsk *ask, ApduAck *ack, Error *err))
{
    if (exchange){
        moduleApdu.Exchange = exchange;
    }else {
        moduleApdu.Exchange = exchangeDefault;
    }
}

struct apdu_interface moduleApdu = {
    exchangeDefault
};

